home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / ktnef / ktnefwriter.h < prev   
Encoding:
C/C++ Source or Header  |  2005-09-10  |  2.5 KB  |  93 lines

  1. /*
  2.     ktnefwriter.cpp
  3.  
  4.     Copyright (C) 2002 Bo Thorsen  <bo@sonofthor.dk>
  5.  
  6.     This file is part of KTNEF, the KDE TNEF support library/program.
  7.  
  8.     This program is free software; you can redistribute it and/or modify
  9.     it under the terms of the GNU General Public License as published by
  10.     the Free Software Foundation; either version 2 of the License, or
  11.     (at your option) any later version.
  12.  
  13.     You should have received a copy of the GNU General Public License
  14.     along with this program; if not, write to the Free Software Foundation,
  15.     Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  16.  */
  17.  
  18. #ifndef KTNEFWRITER_H
  19. #define KTNEFWRITER_H
  20.  
  21. class QString;
  22. class QVariant;
  23. class QIODevice;
  24. class QDataStream;
  25. class QDateTime;
  26. class QStringList;
  27.  
  28. class KTNEFWriter {
  29. public:
  30.   KTNEFWriter();
  31.   ~KTNEFWriter();
  32.  
  33.   void addProperty( int tag, int type, const QVariant& value );
  34.  
  35.   bool writeFile( QIODevice &file );
  36.   bool writeFile( QDataStream &stream );
  37.  
  38.   bool writeProperty( QDataStream &stream, int &bytes, int type);
  39.  
  40.   enum MessageType {
  41.     Appointment, MeetingCancelled, MeetingRequest,
  42.     MeetingNo, MeetingYes, MeetingTent
  43.   };
  44.  
  45.   enum Method {
  46.       PublishNew, Obsolete, RequestNew, RequestUpdate, Unknown
  47.   };
  48.  
  49.   enum Role {
  50.     ReqParticipant, OptParticipant, NonParticipant, Chair
  51.   };
  52.  
  53.   enum PartStat {
  54.     NeedsAction, Accepted, Declined, Tentative,
  55.     Delegated, Completed, InProcess
  56.   };
  57.  
  58.   enum Priority {
  59.     High = 2, Normal = 3, Low = 1
  60.   };
  61.  
  62.   enum AlarmAction {
  63.     Display
  64.   };
  65.  
  66.   // This set of functions sets all properties on the file you want to save
  67.   void setSender(const QString &name, const QString &email);
  68.   void setMessageType(MessageType m);
  69.   void setMethod( Method m );
  70.   void clearAttendees();
  71.   void addAttendee( const QString& cn, Role r, PartStat p, bool rsvp,
  72.                     const QString& mailto );
  73.   void setOrganizer( const QString& organizer ); // Is that the same as sender???
  74.   void setDtStart( const QDateTime& dtStart );
  75.   void setDtEnd( const QDateTime& dtEnd );
  76.   void setLocation( const QString& location );
  77.   void setUID( const QString& uid );
  78.   void setDtStamp( const QDateTime& dtStamp );
  79.   void setCategories( const QStringList& );
  80.   void setDescription( const QString& );
  81.   void setSummary( const QString& );
  82.   void setPriority( Priority p );
  83.   void setAlarm( const QString& description, AlarmAction action,
  84.                  const QDateTime& wakeBefore );
  85.  
  86. private:
  87.   class PrivateData;
  88.   PrivateData *mData;
  89. };
  90.  
  91.  
  92. #endif // KTNEFWRITER_H
  93.